<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/send','RegisterController@sendMessage');
//隐式控制器
//创建路由组
Route::group(['middleware'=>'login'],function(){
	Route::get('/admin',function(){
		
		return view('admin.index.index');
	});
	// 用户路由
	Route::controller('/admin/user','UserController');
	// 商品分类管理
	Route::controller('/admin/cate','CateController');
	//商品
	Route::controller('/admin/goods','GoodsController');
	//商品评论敏感词过滤
	Route::controller('/admin/sensitive','SensitiveController');
	// 店铺
	Route::controller('/admin/market','marketController');
	//网站配置
	Route::controller('/admin/WZconfig','WZconfigController');
	//友情链接
	Route::controller('/admin/friend','FriendController');
	//社区分区
	Route::controller('/admin/partition','PartitionController');
	//社区板块
	Route::controller('/admin/plate','PlateController');
});

//后台登录
Route::controller('/admin/login','LoginController');

//开关网站
Route::group(['middleware'=>'weihu'],function(){

	//注册路由
	Route::get('/register','RegisterController@register');
	//注册后发送
	Route::post('/register','RegisterController@doregister');

	// 前台轮播
	Route::controller('/lbpic','lbpicController');
	// 地址管理路由
	Route::controller('/address','addressController');
	//解析前台首页
	Route::get('/','LayoutController@header');
	// 地址管理路由
	Route::controller('/address','addressController');
	// 订单路由
	Route::controller('/order','orderController');
	//前台登录页面显示
	Route::get('/login','LoginController@login');
	//前台登录

	Route::post('/login/jian','LoginController@jian');

	//退出
	Route::controller('/clear','LoginController');

	//找回密码路由
	Route::controller('/home/login','Forgetcontroller');
	//邮件发送测试
	Route::get('/zhaohui','Frecontroller@zhaohui');

	//找回密码邮箱发送成功
	Route::controller('/fsuccess','Fsuccesscontroller');

	//点击修改密码链接
	Route::controller('/change','ChangeController');

	//找回密码邮箱发送成功
	Route::controller('/fsuccess','Fsuccesscontroller');
	//点击修改密码链接
	Route::controller('/change','ChangeController');

	//修改个人资料
	Route::controller('/basics','BasicsController');

	// 用户路由
	Route::controller('/admin/user','UserController');
	// 商品分类管理
	Route::controller('/admin/cate','CateController');
	// 店铺
	Route::controller('/admin/market','marketController');
	//商品
	Route::controller('/admin/goods','GoodsController');

	//修改密码
	Route::get('/person','PasswordeditController@passwordedit');
	Route::post('/passwordedit/xiugai','PasswordeditController@xiugai');

	//登录路由
	// Route::get('/register','LoginController@login');
	Route::controller('/register','RegisterController');
	//验证码
	Route::get('/vcode','RegisterController@vcode');
	//邮件发送测试
	Route::get('/sendMail','RegisterController@sendMail');
	//激活
	Route::get('/jihuo','RegisterController@jihuo');

	//收藏店铺
	Route::controller('/collection','CollectionController');

	//评论
	Route::controller('/comment','CommentController');
	//发帖
	Route::controller('/community/fatie','TieziController');
	//社区
	Route::controller('/community','CommunityController');

	//主贴管理
	Route::controller('/admin/tiezi','TieziController');
	
	//前台帖子列表
	// Route::controller('/community/list','ListController');
	

	// 回帖列表
	Route::controller('/answer','Answercontroller');


	//前台商品列表 商品详情
	Route::controller('/','HomeListController');

});